﻿using AutoMapper;
using Traceability.App.API.Application.Command.Basic;
using Traceability.App.API.Application.Command.Breeding;
using Traceability.App.API.Application.Command.Company;
using Traceability.App.API.Application.Command.Img;
using Traceability.App.API.Application.Command.Immune;
using Traceability.App.API.Application.Command.Processing;
using Traceability.App.API.Application.Command.Slaughter;
using Traceability.App.API.Application.Command.Suppliers;
using Traceability.App.API.DTOS;
using Traceability.App.Domain.Entities;

namespace Traceability.App.API
{
    public class MyAutoMapper : Profile
    {
        public MyAutoMapper()
        {
            //基本信息
            #region  
            CreateMap<CreateBasic_TraceabilityCommand,Basic_Traceability>().ReverseMap();

            CreateMap<UpdateBasic_TraceabilityCommand, Basic_Traceability>().ReverseMap();

            CreateMap<GoodsDTO,Goods_Information>().ReverseMap();
            #endregion

            //养殖信息
            #region

            CreateMap<CreateBreedingCommand,Breeding_Information>().ReverseMap();
            CreateMap<BreedingDTO,Breeding_Information>().ReverseMap();

            #endregion

            //免疫信息
            #region

            CreateMap<CreateImmuneCommand, Immune_Information>().ReverseMap();
            CreateMap<ImmuneDTO, Immune_Information>().ReverseMap();
            CreateMap<UpdateImmuneCommand, Immune_Information>().ReverseMap();

            #endregion

            //企业信息
            #region

            CreateMap<CreateCompanyCommand, Company_Information>().ReverseMap();
            CreateMap<CompanyDTO, Company_Information>().ReverseMap();

            #endregion

            //屠宰信息
            #region

            CreateMap<CreateSlaughterCommand, Slaughter_Information>().ReverseMap();
            CreateMap<SlaughterDTO, Slaughter_Information>().ReverseMap();

            #endregion

            //深加工信息
            #region

            CreateMap<CreateProcessingCommand, Processing_Information>().ReverseMap();
            CreateMap<ProcessingDTO, Processing_Information>().ReverseMap();

            #endregion


            //供应商信息
            #region

            CreateMap<CreateSupplierCommand, Supplier>().ReverseMap();
            CreateMap<SupplierDTO, Supplier>().ReverseMap();

            #endregion

            //图片信息
            #region

            CreateMap<CreateImgCommand, Picture_Information>().ReverseMap();
            CreateMap<PictureDTO, Picture_Information>().ReverseMap();

            #endregion
        }
    }
}
